package net.tv90.auth.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.tv90.auth.utils.encrypt.EncryptTypeHandler;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(autoResultMap = true, value = "account")
public class Account {

    @TableId(type = IdType.AUTO)
    Long id;

    String username;

    @TableField(typeHandler = EncryptTypeHandler.class)
    String password;

    String telephone;

    String email;

    LocalDateTime createTime;

    String createIp;

    LocalDateTime lastLoginTime;

    String lastLoginIp;

    Integer loginTimes;

    Integer status;
}
